<?php

namespace Trawind\Basics\Commands;

use Illuminate\Console\Command;
use Illuminate\Redis\RedisManager;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Redis;
use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException;
use Trawind\Helpers\SystemHelper;

class SystemUpCommand extends Command
{

    /**
     * The console command signature.
     *
     * @var string
     */
    protected $signature = 'system:up';


    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Bring the application out of maintenance mode';


    public function handle()
    {
        SystemHelper::redis()->del(SystemDownCommand::DOWN_KEY);

        $this->info('Application is now live.');
        return 1;
    }

}